package dev.android.yeqh.alarmclock.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * CopyRight(c)2010-2010:    All right Reserved</br>
 * FileName:    DbHelper.java</br>
 * Description: 鏁版嵁搴撳府鍔╃被</br>
 * @author      yeqh
 * @version     1.0
 */
public class DbHelper extends SQLiteOpenHelper {
    
    public DbHelper(Context context, String name,
                CursorFactory factory, int version) {
        super(context, name, factory, version);
    }

    public void onCreate(SQLiteDatabase db) {
        db.execSQL(DBM.DATEBASE_CREATE);
    }

    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
        db.execSQL("DROP TABLE IF EXISTS " + DBM.TABLE_NAME);
        onCreate(db);
    }
    
}